//
//  RegisterController.m
//  MyCloudMusic
//
//  Created by xiaolong on 2024/5/5.
//

#import "RegisterController.h"

@interface RegisterController ()
@property (nonatomic, strong)UIButton *otherButton;
@end

@implementation RegisterController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.otherButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.otherButton setTitle:@"纯代码方式添加按钮" forState:UIControlStateNormal];
    [self.otherButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.otherButton setTitleColor:[UIColor greenColor] forState:UIControlStateHighlighted];
    
    [self.otherButton addTarget:self action:@selector(otherClicked:) forControlEvents:UIControlEventTouchUpInside];
    
    self.otherButton.backgroundColor = [UIColor redColor];
    self.otherButton.layer.cornerRadius = 5;
    
    [self.view addSubview:self.otherButton];
    
    NSLog(@"viewDidLoad");
}


- (void)otherClicked:(UIButton *)btn{
    NSLog(@"otherClicked  ");
    

}


- (void)viewDidLayoutSubviews{
    [super viewDidLayoutSubviews];
}

@end
